<?php if ($this->get_data('keywords')):?>
<div class="keyword_container">
<?php foreach ($this->get_data('keywords') as $keyword): ?>
<a id="keyword_<?php echo $keyword['id'];?>" 
    class="keyword<?php echo isset($keyword['selected']) ? ' selected' : '';?>" style="color:<?php echo '#' . $keyword['color'];?>;background:<?php echo '#' . $keyword['bg_color'];?>"
    href="<?php echo tos_router_url(array('url' => '_label/' . tos_clean_url_segment($keyword['word'])))?>" >
    <?php echo $keyword['word'];?>(<?php echo $keyword['hit'];?>)</a>
<?php endforeach;?>
</div>
<?php endif;?>